Skip to content

Fix upb wire decoder accepting field number 0.#28781

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_952905580
Jul 24, 2026
Merged

Fix upb wire decoder accepting field number 0.#28781
copybara-service[bot] merged 1 commit into
mainfrom
test_952905580

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Jul 23, 2026

Copy link
Copy Markdown

Fix upb wire decoder accepting field number 0.

Reject field_number 0 tags in _upb_WireReader_SkipValueForceInline.
Protocol Buffer wire format requires field numbers to be positive integers
(1 to 536,870,911). Previously, _upb_WireReader_SkipValueForceInline lacked a
(tag >> 3) == 0 check, allowing upb to accept and round-trip illegal field 0
tags in empty messages, unknown groups, and MessageSet items.

@copybara-service copybara-service Bot changed the title Internal change Fix upb wire decoder accepting field number 0. Jul 24, 2026
Reject field_number 0 tags in _upb_WireReader_SkipValueForceInline.
Protocol Buffer wire format requires field numbers to be positive integers
(1 to 536,870,911). Previously, _upb_WireReader_SkipValueForceInline lacked a
(tag >> 3) == 0 check, allowing upb to accept and round-trip illegal field 0
tags in empty messages, unknown groups, and MessageSet items.

PiperOrigin-RevId: 953447806
@copybara-service
copybara-service Bot merged commit beb01ec into main Jul 24, 2026
1 check passed
@copybara-service
copybara-service Bot deleted the test_952905580 branch July 24, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant